#ifndef GOODSPURCHASINGWINDOW_H
#define GOODSPURCHASINGWINDOW_H

#include <QMainWindow>
#include<QFile>
#include<goods.h>
#include"buyinform.h"
#include<QTcpSocket>
namespace Ui {
class goodsPurchasingWindow;
}

class goodsPurchasingWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit goodsPurchasingWindow(QWidget *parent = nullptr);
    ~goodsPurchasingWindow();
signals:
    void getgoods();

public slots:
    void getValue( goods* good);

private slots:
    void on_SearchButton_clicked();

    void on_confirButton_clicked();

    void on_confirBuyButton_clicked();

    void on_returnButton_clicked();
    void connectedTohost();
    void readData();
private:
    Ui::goodsPurchasingWindow *ui;
    QByteArray arr1;
//    QList<QString> saledName;
    QFile *saleLog;
    double totalprice;
   QList<buyinForm*> Formlist;
    QList<goods*> goodslist;
   QTcpSocket* socket;

};

#endif // GOODSPURCHASINGWINDOW_H
